﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Ext.Net;
using Sharp.DataTransferObject;
using Sharp.Portal;
using Sharp.Portal.ExtNet;
using Sharp.Portal.Mvc;
using Sharp.Portal.Mvc.Form;

namespace Sharp.WebBooter.Areas.Platform.Models
{
    /// <summary>
    /// 岗位管理
    /// </summary>
    public partial class JobModel : ISharpForm
    {
        public JobModel()
        {
            UI = new ExtSharpFrom(this);
        }


        /// <summary>
        /// 主键Id
        /// </summary>
        /// <value>主键Id</value>
        [HiddenInput]
        public int Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        /// <value>标题</value>
        [Display(Name = "名称")]
        public string Title { get; set; }
        /// <summary>
        /// 归属组织
        /// </summary>
        [Display(Name = "归属组织"), CustomField(FieldType.OrgTreeList,nameof(ParentIdDataSource))]
        public Guid? ParentId { get; set; }
        /// <summary>
        /// 所属组织
        /// </summary>
        public Node ParentIdDataSource { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        /// <value>排序的值</value>
        public int? OrderIndex { get; set; }
        /// <summary>
        /// 职级
        /// </summary>
        [Display(Name = "职级"), MasterData("Grade")]
        public string GradeCode { get; set; }

        /// <summary>
        /// 入职资质
        /// </summary>
        [Display(Name = "入职资质"), DataType(DataType.MultilineText)]
        public string Qualifications { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注"), DataType(DataType.MultilineText)]
        public string Remark { get; set; }


        public SharpFrom UI { get; set; }
    }
}